<script type="text/javascript">
    $(document).ready(function()
    {
        $("#chkUserIdAll").click(function()				
        {
            var checked_status = this.checked;
            $("input[name=chkUserId[]]").each(function()
            {
                this.checked = checked_status;
            });
        });					
    });
</script>
<div class="content">
    <div class="content-header">
        <h3>User</h3>
        {include file="base/templates/menubar.html"}
        <div class="clear"></div>
    </div>
    {include file="base/templates/notification.html"}
    <div class="paging">
        {$strPaginationLink}
    </div>
    <form accept-charset="utf-8" method="post" action="{$strUrlDel|default:''}">
        <table width="100%" class="table-view">
            <tbody> 
                <tr>
                    <th width="1%"><input type="checkbox" id="chkUserIdAll"/></th>
                    <th width="10%">User Id</th>
                    <th width="25%">Username</th>
                    <th width="10%">Login Status</th>  
                    <th width="15%">Lock Status</th>
                    <th width="15%">Last Login</th>
                    <th width="10%"></th>
                </tr> 
                {foreach $arrUserdata as $arrUser}
                <tr>
                    <td><input type="checkbox" name="chkUserId[]" value="{$arrUser['user_id']}"></td>
                    <td>{$arrUser['user_id']}</td>
                    <td>{$arrUser['user_nm']}</td>
                    {if $arrUser['login_st'] eq 1}
                    <td>Login</td>
                    {else}
                    <td>Logout</td>
                    {/if}
                    {if $arrUser['lock_st'] eq 1}
                    <td>Locked</td>
                    {else}
                    <td>Unlocked</td>
                    {/if}
                    <td>{$arrUser['last_login']}</td>
                    {if $arrPageRule[2]|default:'' eq '1'}
                        <td align="right"><a class="button" href="{$strUrlEdit|default:''}/{$arrUser['user_id']|default:''}">Edit</a></td>
                    {else}
                        <td align="right"><a class="button" href="#">Unprivilege</a></td>
                    {/if}
                </tr>
                {/foreach}
                <tr class="action">
                    <td align="left" colspan="8">
                        {if $arrPageRule[3]|default:'' eq '1'}
                            <input type="submit" name="" value="Hapus" class="button-del"/>
                        {/if}
                    </td>
                </tr>
            </tbody>
        </table>
    </form> 
</div>